#include "SMPPBroadcastRepNum.hpp"

using namespace smpp::pdu;

BroadcastRepNum::BroadcastRepNum(const quint16 nValue):
TLV(TLVtags::TAG_BROADCAST_REP_NUM,2),_Value(nValue){}

BroadcastRepNum::BroadcastRepNum(const BroadcastRepNum &nBroadcastRepNum):
TLV(nBroadcastRepNum),_Value(nBroadcastRepNum.getValue()){}

bool BroadcastRepNum::operator ==(
	const BroadcastRepNum &nBroadcastRepNum) const{
	return (TLV::operator == (nBroadcastRepNum) && 
			_Value == nBroadcastRepNum.getValue());
}

bool BroadcastRepNum::operator !=(
	const BroadcastRepNum &nBroadcastRepNum) const{
	return !this->operator == (nBroadcastRepNum);
}

BroadcastRepNum &BroadcastRepNum::operator = (
	const BroadcastRepNum &nBroadcastRepNum){
	if(*this == nBroadcastRepNum)
		return *this;
	TLV::operator = (nBroadcastRepNum);
	_Value = nBroadcastRepNum.getValue();
	return *this;
}

void BroadcastRepNum::setValue(const quint16 nValue){
	_Value = nValue;
}

const quint16 BroadcastRepNum::getValue() const{
	return _Value;
}
